package com.example.testdemo.progess_image;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.example.testdemo.R;

/**
 * Created by MrYan on 2018/8/4.
 */

public class ProgressImgActivity extends Activity {
    private int progress;

    private ProgressImgView imgView;
    private ProgressImgView imgView2;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_progress_img);
        imgView = findViewById(R.id.progressImgView);
        imgView2 = findViewById(R.id.prizeRecyclerView2);
    }

    public void progressAdd10(View view) {
        if (progress < 100){
            progress = progress + 10;
            imgView.setProgress(progress);
            imgView2.setProgress(progress);
        }
    }

    public void empty(View view){
        progress = 0;
        imgView.setProgress(0);
        imgView2.setProgress(0);
    }
}
